import { ApiProperty } from '@nestjs/swagger';
import { AudioSynthesisStatus, SimulationAlgoType } from "common/utils/data";
import { BaseResult, BaseScrollPageListResult } from "@/common/base/base.result";
import {
  AudioSynthesisEarbuds2earbudsModel
} from "@/module/audio-synthesis-earbuds2earbuds/audio-synthesis-earbuds2earbuds.model";

class Earbuds2EarbudsResultKeyItem{
  @ApiProperty()
  key: string;

  @ApiProperty()
  matchFilename: string;
}

export class Earbuds2EarbudsResult {
  @ApiProperty({
    type: [Earbuds2EarbudsResultKeyItem]
  })
  keyList: Earbuds2EarbudsResultKeyItem[];
}

export class GlobalResGlobalWorkListItem {
  @ApiProperty()
  uuid: string;

  @ApiProperty()
  status: AudioSynthesisStatus;

  @ApiProperty()
  createTime: number;
}
export class GlobalRes{
  @ApiProperty({
    type: [GlobalResGlobalWorkListItem]
  })
  globalWorkList: GlobalResGlobalWorkListItem[];

  @ApiProperty()
  userCountPerDay: number;

  @ApiProperty()
  countByServerParallel: number;
}

export class AudioSynthesisBatchResult extends  BaseResult{
  @ApiProperty({
    enum: AudioSynthesisStatus,
  })
  status: AudioSynthesisStatus;

  @ApiProperty()
  currentName: string;

  @ApiProperty()
  targetName: string;

  @ApiProperty()
  currentAudioFile: string;

  @ApiProperty()
  targetAudioFile: string;

  /*@ApiProperty()
  errorReason: string;*/

  @ApiProperty()
  updateTime: number;
}


class AudioSynthesisIndexEarbuds2EarbudsResultEarbuds2earbudsEvaluation{
  @ApiProperty()
  buyUrl: string;
}

class AudioSynthesisIndexEarbuds2EarbudsResultEarbuds2earbuds{
  @ApiProperty()
  currentEvaluationUuid: string;

  @ApiProperty()
  targetEvaluationUuid: string;

  @ApiProperty({
    type: AudioSynthesisIndexEarbuds2EarbudsResultEarbuds2earbudsEvaluation,
  })
  currentEvaluation: AudioSynthesisIndexEarbuds2EarbudsResultEarbuds2earbudsEvaluation;

  @ApiProperty({
    type: AudioSynthesisIndexEarbuds2EarbudsResultEarbuds2earbudsEvaluation,
  })
  targetEvaluation: AudioSynthesisIndexEarbuds2EarbudsResultEarbuds2earbudsEvaluation;

  @ApiProperty({
    enum: SimulationAlgoType
  })
  simulationAlgo: SimulationAlgoType;
}

export class AudioSynthesisIndexEarbuds2EarbudsResult extends BaseScrollPageListResult{
  @ApiProperty({
    enum: AudioSynthesisStatus,
  })
  status: AudioSynthesisStatus;

  @ApiProperty()
  currentName: string;

  @ApiProperty()
  targetName: string;

  @ApiProperty()
  currentAudioFile: string;

  @ApiProperty()
  targetAudioFile: string;

  /*@ApiProperty()
  errorReason: string;*/

  @ApiProperty()
  createTime: number;

  @ApiProperty({
    type: AudioSynthesisIndexEarbuds2EarbudsResultEarbuds2earbuds,
  })
  audioSynthesisEarbuds2earbuds: AudioSynthesisIndexEarbuds2EarbudsResultEarbuds2earbuds;
}
